<?php $this->assign('subtitle', 'Cadastrar nova emissora'); ?>

<div class="row content-view">
    <div class="col-md-offset-1 col-md-10">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title text-info">Dados cadastrais da emissora no painel</h3>
            </div>
            <div class="panel-body">
                <form role="form" method="POST" >
                    <fieldset class="form-panel dashed">
                        <div class="col-md-5">
                            <div class="form-group <?php echo isset($errors['cpf_cnpj']) ? 'has-error' : ''; ?>">
                                <label class="control-label required" for="cpf_cnpj">Digite o CNPJ da Emissora:</label>
                                <input autofocus class="form-control cnpj" name="cpf_cnpj" id="cpf_cnpj" value="<?php echo $emissora['cpf_cnpj']; ?>" />
                                <?= $this->element('field_errors', [ "errors" => $errors, 'field' => 'cpf_cnpj']); ?>
                            </div>
                            <div class="form-group <?php echo isset($errors['razaosocial']) ? 'has-error' : ''; ?>">
                                <label class="control-label required" for="razaosocial">Razão Social:</label>
                                <input class="form-control" placeholder="Insira a razão social" name="razaosocial" id="razaosocial" value="<?php echo $emissora['razaosocial']; ?>" />
                                <?= $this->element('field_errors', [ "errors" => $errors, 'field' => 'razaosocial']); ?>
                            </div>
                            <div class="form-group <?php echo isset($errors['nomefantasia']) ? 'has-error' : ''; ?>">
                                <label class="control-label required" for="nomefantasia">Nome Fantasia:</label>
                                <input class="form-control" placeholder="Insira nome fantasia" name="nomefantasia" id="nomefantasia" value="<?php echo $emissora['nomefantasia']; ?>" />
                                <?= $this->element('field_errors', [ "errors" => $errors, 'field' => 'nomefantasia']); ?>
                            </div>
                        </div>
                        <div class="col-md-5 col-md-offset-1">
                            <div class="form-group <?php echo isset($errors['cidade']) ? 'has-error' : ''; ?>">
                                <label class="control-label" for="cidade">Cidade:</label>
                                <input class="form-control" placeholder="Insira a cidade" name="cidade" id="codigo_abert" value="<?php echo $emissora['cidade']; ?>" />
                                <?= $this->element('field_errors', [ "errors" => $errors, 'field' => 'cidade']); ?>
                            </div>
                            <div class="form-group <?php echo isset($errors['codigo_abert']) ? 'has-error' : ''; ?>">
                                <label class="control-label" for="codigo_abert">Código ABERT:</label>
                                <input class="form-control" placeholder="Insira o código" maxlength="5" name="codigo_abert" id="codigoabert" value="<?php echo $emissora['codigo_abert']; ?>" />
                                <?= $this->element('field_errors', [ "errors" => $errors, 'field' => 'codigo_abert']); ?>
                            </div>
                        </div>
                        
                        <div class="form-group col-md-12" style="margin-top: 4%">
                            <div class="pull-right">
                                <button class="btn btn-info">Enviar formulario</button>
                            </div>
                        </div>
                    </fieldset>
                    <fieldset class="form-panel dashed">
                        <!--<div class="col-md-5">
                            <div class="form-group <?php echo isset($errors['responsavel_cadastro']) ? 'has-error' : ''; ?>">
                                <label class="control-label" for="responsavel_cadastro">Nome:</label>
                                <input readonly="true" class="form-control" placeholder="Nome do cadastrante" name="responsavel_cadastro" id="responsavel_cadastro" value="<?php echo $emissora['responsavel_cadastro']; ?>" />
                                <?= $this->element('field_errors', [ "errors" => $errors, 'field' => 'responsavel_cadastro']); ?>
                            </div>
                            <div class="form-group <?php echo isset($errors['departamento_responsavel']) ? 'has-error' : ''; ?>">
                                <label class="control-label" for="departamento_responsavel">Departamento:</label>
                                <input readonly="true" class="form-control" placeholder="Marca empresarial" name="departamento_responsavel" id="departamento" value="<?php echo $emissora['departamento_responsavel']; ?>" />
                                <?= $this->element('field_errors', [ "errors" => $errors, 'field' => 'departamento_responsavel']); ?>
                            </div>
                            <div class="form-group <?php echo isset($errors['telefone_responsavel']) ? 'has-error' : ''; ?>">
                                <label class="control-label" for="telefone_responsavel">Telefone:</label>
                                <input readonly="true" class="form-control telefone" name="telefone_responsavel" id="telefone_responsavel" value="<?php echo $emissora['telefone_responsavel']; ?>" />
                                <?= $this->element('field_errors', [ "errors" => $errors, 'field' => 'telefone_responsavel']); ?>
                            </div>
                        </div>
                        <div class="col-md-5 col-md-offset-1">
                            <div class="form-group <?php echo isset($errors['cargo_responsavel']) ? 'has-error' : ''; ?>">
                                <label class="control-label" for="cargo_responsavel">Cargo:</label>
                                <input readonly="true" class="form-control" placeholder="Cargo do cadastrante" name="cargo_responsavel" id="cidade" value="<?php echo $emissora['cargo_responsavel']; ?>" />
                                <?= $this->element('field_errors', [ "errors" => $errors, 'field' => 'cargo_responsavel']); ?>
                            </div>
                            <div class="form-group <?php echo isset($errors['email_responsavel']) ? 'has-error' : ''; ?>">
                                <label class="control-label" for="email_responsavel">Email:</label>
                                <input readonly="true" type="email" class="form-control" placeholder="Email do cadastrante" name="email_responsavel" id="email" value="<?php echo $emissora['email_responsavel']; ?>" />
                                <?= $this->element('field_errors', [ "errors" => $errors, 'field' => 'email_responsavel']); ?>
                            </div>
                            <div class="form-group">
                                <label class="control-label" for="celular_responsavel">Celular:</label>
                                <input readonly="true" class="form-control celphone" name="celular_responsavel" id="celular_responsavel" value="<?php echo $emissora['celular_responsavel']; ?>" />
                            </div>
                        </div>-->
                        
                    </fieldset>
                    <p style="text-align: center">Os dados marcados com <span class="required-mark">*</span> são obrigatórios, caso contrário o cadastro não poderá ser efetuado</p>
                </form>
            </div>
        </div>
    </div>

</div>